package com.ailesson.video.feign;

import com.ailesson.common.reply.R;
import com.ailesson.video.dto.CourseDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient("video-service")
public interface CourseFeignClient {


    @PostMapping("/api/video/course/findByKeyword/{keyword}")
    R<List<CourseDto>> findByKeyword(@PathVariable("keyword") String keyword);

    @GetMapping("/api/video/course/getById/{courseId}")
    R<CourseDto> getById(@PathVariable("courseId") Long courseId);
}
